﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="member.aspx.cs" Inherits="WebSite.admin.member.member" %>

 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>良臣直销网 </title>
    <link href="../main.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
        parent.maintitle.innerHTML = "会员管理";
        parent.contentmain.innerHTML = "<span class='title01'>所在位置：</span>会员列表"
    </script>
    <script language='javascript'>
        var path = (window.top.location).toString();
        if (path.indexOf('login.aspx') == -1) {
            if (path.indexOf('index.aspx') == -1) {
                window.top.location = 'index.aspx';
            }
        }
	</script>
	<script type="text/javascript" language="javascript">
	    function CheckSelect(del, str) {
	        var rt = true;
	        var num = 0;
	        var boxorder = 0;
	        var objCheckBox;
	        for (var i = 0; i < form1.length; i++) {
	            ///alert(form1.elements[i].type);
	            if (form1.elements[i].type == "checkbox") {
	                boxorder++;
	                objCheckBox = form1.elements[i];
	                ///alert(objCheckBox.checked);
	                if (objCheckBox.checked) {
	                    if (boxorder > 1) {
	                        //如果是第一个CheckBox，是用来全选全消的，这个不算，不用自加
	                        num++;
	                    }
	                }
	            }
	        }
	        ///alert(num);
	        if (!del) {
	            if (num > 1) {
	                alert("此操作不允许选择多个事件");
	                rt = false;
	            }
	        }
	        if (str == 'del') {
	            if (num == 0) {
	                alert("你没有选择要删除的信息");
	                rt = false
	            } else { return confirm('你确定要删除这些信息吗?'); }
	            ///alert(rt);
	        }
	        else {
	            if (str == 'update') {
	                if (num == 0) {
	                    alert("你没有选择要更新的信息");
	                    rt = false
	                } else { return confirm('你确定要更新这些信息吗?'); }
	                ///alert(rt);
	            } 
	        }
	        return rt;
	    }

	    function SelectAll(sa) {
	        ///全选/全消
	        var objCheckBox;
	        for (var i = 0; i < form1.length; i++) {
	            if (form1.elements[i].type == "checkbox") {
	                objCheckBox = form1.elements[i];
	                objCheckBox.checked = sa;
	            }
	        }
	    }
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <center>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F1F4F7">
<tr>
<td height="382" align="center" valign="top">
  <br />
  <table Width="98%" border="0" cellpadding="0" cellspacing="4" bgcolor="#FAFBFC" class="img">
    <tr>
      <td width="4%"><img height="22" alt="SEARCH" src="../images/icon_search.gif" width="26" border="0" /></td>
<td>
会员名称 
<input name="memberlogin" id="memberlogin" runat="server" style="width: 200px" />
</td>
<td>
卡号：<input name="cardCode" id="cardCode" runat="server" />
</td>
<td>
电话号码：<input name="telPhone" id="telPhone" runat="server" />
</td>

<td>
<asp:ImageButton ID="ImageButton1" ImageUrl="../images/button04.gif" runat="server" OnClick="ImageButton2_Click" /></td>
      </tr>
  </table>
  <br />
  <asp:GridView ID="GridView1" runat="server" Width="98%" CellPadding="4" ForeColor="#333333" DataKeyNames="memberid" AutoGenerateColumns="False" AllowPaging="True" pagesize="30" BorderStyle="Solid" BorderWidth="1px" OnRowDataBound="GridView1_RowDataBound"
      ShowFooter="false" EmptyDataText="没有数据记录！！" AllowSorting="True" >
        <Columns>
            <asp:TemplateField ShowHeader="False" HeaderText="选择">
             <ItemStyle Width="30px" Wrap="False" />
             <HeaderTemplate>
                 <asp:CheckBox ID="CheckBox1" runat="server"></asp:CheckBox>
             </HeaderTemplate>
             <ItemTemplate>
                 <asp:CheckBox ID="CheckBox1" runat="server"></asp:CheckBox>
             </ItemTemplate>
            </asp:TemplateField>
        <asp:HyperLinkField DataNavigateUrlFields="memberid" DataNavigateUrlFormatString="users_edit.aspx?mid={0}" HeaderText="用户名" DataTextField="memberlogin" />
        <asp:BoundField HeaderText="收件人姓名" DataField="membername" sortexpression="membername" />
        <asp:TemplateField ShowHeader="False" HeaderText="邮件地址">
             <ItemTemplate>
            <a href="mailto:<%# Eval("email")%>"><%# Eval("email")%></a> 
             </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField HeaderText="注册日期" DataField="updatetime" sortexpression="updatetime" />
        <asp:BoundField HeaderText="" DataField="memberid" sortexpression="memberid" />
          <asp:BoundField HeaderText="账户余额" DataField="money" sortexpression="money" />
            <asp:BoundField HeaderText="礼品卡" DataField="" sortexpression="" />
        <asp:TemplateField ShowHeader="False" HeaderText="操作">
             <ItemTemplate>
              <a title="编辑" href="users_edit.aspx?mid=<%# Eval("memberid") %>"><img height="16" src="../images/icon_edit.gif" width="16" border="0" /></a> 
              <a title="收货地址" style="display:none" href="users_address.aspx?mid=<%# Eval("memberid") %>"><img height="16" src="../images/book_open.gif" width="16" border="0" /></a> 
              <a title="查看订单" href="/admin/order/order.aspx?mid=<%# Eval("memberid") %>"><img height="16" src="../images/icon_view.gif" width="16" border="0" /></a> 
              <a title="查看账目明细" style="display:none" href="account_log.aspx?mid=<%# Eval("memberid") %>"><img height="16" src="../images/icon_account.gif" width="16" border="0" /></a> 
              <a title="移除" href="member.aspx?action=del&amp;mid=<%# Eval("memberid") %>" onClick="javascript:return confirm('你确定要删除这个会员吗?');"><img height="16" src="../images/icon_drop.gif" width="16" border="0" /></a>
             </ItemTemplate>
        </asp:TemplateField>
        </Columns>
             <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />             
             <PagerStyle BackColor="White" ForeColor="#333333" HorizontalAlign="Center" Font-Bold="True" Font-Size=30px />
             <HeaderStyle BackColor="#E2E7EB" Font-Bold="True" ForeColor="Black" HorizontalAlign="Left" />
             <AlternatingRowStyle BackColor="White" />
             <PagerSettings Visible="False" />
    </asp:GridView>
    <table Width="98%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td><asp:ImageButton ID="ImageButton2" ImageUrl="../images/button09.gif" runat="server" OnClick="ImageButton1_Click" /></td>
         <td height="25" align="right" bgcolor="#E9ECEF"><asp:Label ID="LblRecordCount" runat="server"></asp:Label>
            <asp:Label ID="LblCurrentIndex" runat="server"></asp:Label>
            <asp:Label ID="LblPageCount" runat="server"></asp:Label>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="btnFirst" CommandArgument="first" OnClick="PagerButtonClick" runat="server">首 页</asp:LinkButton> 
            <asp:LinkButton ID="btnPrev" CommandArgument="prev" OnClick="PagerButtonClick" runat="server">上一页</asp:LinkButton> 
            <asp:LinkButton ID="btnNext" CommandArgument="next" OnClick="PagerButtonClick" runat="server">下一页</asp:LinkButton> 
            <asp:LinkButton ID="btnLast" CommandArgument="last" OnClick="PagerButtonClick" runat="server">尾 页</asp:LinkButton> 
             跳转到第<asp:DropDownList ID="ddlCurrentPage" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList>页&nbsp;
         </td>
       </tr>
    </table>
  </td>
</tr>
</table>
</center>
    </div>
    </form>
</body>
</html>
